package xerr

var code2Msg = map[uint32]string{
	DbError:        "数据库访问异常",
	InvalidParams:  "参数无效",
	ServerError:    "服务器开小差了",
	SmsOverReq:     "发送短信频繁",
	SmsCodeExpired: "验证码过期",
	SmsCodeErr:     "验证码错误",

	PhoneExisted: "手机号已注册过来",
	UnamePwdErr:  "用户名或密码错误",
}

func GetMsgByCode(code uint32) string {
	if msg, ok := code2Msg[code]; ok {
		return msg
	} else {
		return "服务器开小差了"
	}
}
